
# 免费代理ip源：https://www.kuaidaili.com/free/intr
# 代理

import requests

had = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36"
}

proxy='14.115.107.72:9797'  #本地代理
proxies={
    'http':'http://'+proxy
    # 'https':'https://'+proxy
}
resp = requests.get("https://www.baidu.com", proxies = proxies,headers = had)
resp.encoding = "utf-8"
print(resp.text)

# 回话
session = requests.sessions
